////////////////////////////////////////////////////////////////////////////////
/// Midnight Circus 2006
////////////////////////////////////////////////////////////////////////////////

namespace MidnightCircus
{
    public class DemoPlugin : NWN2Toolset.Plugins.INWN2Plugin
    {
        private TD.SandBar.MenuButtonItem m_cMenuItem;

        private void HandlePluginLaunch(object sender, System.EventArgs e)
        {
            // This code is executed when the menu is selected
            System.Windows.Forms.MessageBox.Show("Hello World!");
        }

        ////////////////////////////////////////////////////////////////////////
        // called when the toolset is started
        ////////////////////////////////////////////////////////////////////////
        public void Load(NWN2Toolset.Plugins.INWN2PluginHost cHost)
        {
        }

        ////////////////////////////////////////////////////////////////////////
        // called when the toolset is closed
        ////////////////////////////////////////////////////////////////////////
        public void Unload(NWN2Toolset.Plugins.INWN2PluginHost cHost)
        {
        }

        ////////////////////////////////////////////////////////////////////////
        // called when the plugin is selected
        ////////////////////////////////////////////////////////////////////////
        public void Startup(NWN2Toolset.Plugins.INWN2PluginHost cHost)
        {
            m_cMenuItem = cHost.GetMenuForPlugin(this);
            m_cMenuItem.Activate += new System.EventHandler(this.HandlePluginLaunch);
        }

        ////////////////////////////////////////////////////////////////////////
        // called when the plugin is terminated
        ////////////////////////////////////////////////////////////////////////
        public void Shutdown(NWN2Toolset.Plugins.INWN2PluginHost cHost)
        {
        }

        public TD.SandBar.MenuButtonItem PluginMenuItem
        {
            get
            {
                return m_cMenuItem;
            }
        }

        // Properties
        public string DisplayName
        {
            get
            {
                return "Demo Plugin";
            }
        }

        public string MenuName
        {
            get
            {
                return "Demo Plugin";
            }
        }

        public string Name
        {
            get
            {
                return "DemoPlugin";
            }
        }


        public object Preferences
        {
            get
            {
                return null;
            }
            set
            {
            }
        }

    }
}